<template>
  <div id="assetsDetailHangquan">
    <div class="homeTitle">行权方式</div>
    <div class="table">
        <table>
          <tr>
            <td>行权方式</td>
            <td>行权日</td>
            <td>行权价格(元/百元面值)</td>
            <td>行权利率(%)</td>
            <td>行权利差(%)</td>
            <td>行权备注</td>
          </tr>
          <tr v-for="(item, index) in data" :key="index">
            <td>{{item.way}}</td>
            <td>{{item.day | dateformat('YYYY-MM-DD')}}</td>
            <td>{{item.price}}</td>
            <td>{{item.rate}}</td>
            <td>{{item.margin}}</td>
            <td>{{item.remark}}</td>
          </tr>
        </table>
      </div>
    <div class="btn">
      <el-button type="primary" size='small' @click="$router.go(-1)">返回</el-button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'assetsDetailHangquan',
  data () {
    return {
      data: []
    };
  },
  created () {
    this.data = this.$route.query.data;
  }
};
</script>

<style lang="scss">
  #assetsDetailHangquan {
   table {
     margin-top: 20px;
      width: 100%;
      td {
        padding: 5px 10px;
        text-align: center;
        &:nth-child(odd) {
          background-color: #181C1D;
          color: white;
        }
        &:nth-child(even) {
          background: #535853;
        }
        >span {
          color: red;
        }
      }
    }
    table {
      border: 1px solid white;
      width: 100%;
      border-collapse: collapse;
        tr {
          &:first-child {
            background-color: #181C1D !important;;
            color: white;
            td {
              background-color: #181C1D !important;
            }
          }
          td {
            text-align: center;
            padding: 5px 10px;
            border-right: 1px solid white;
            border-bottom: 1px solid white;
            color: white;
            background: #2C3135;
          }
      }
    }
    .addwhite {
      height: 46px;
      background-color: white;
      padding: 0 20px;
      span {
        color: #cccccc;
        line-height: 46px;
      }
    }
    .btn {
      text-align: center;
      margin: 20px 0;
    }
  }
</style>
